package com.simen.downloader.model;

import android.net.Uri;

import java.io.Serializable;

/**
 * Created by zhangming on 16/4/26.
 */
public class LocalFile implements Serializable {
    private String localpath;
    private String fileurl;

    public LocalFile(String localpath, String fileurl) {
        this.localpath = localpath;
        this.fileurl = fileurl;
    }

    public String getFileName() {
        if (this.fileurl == null) {
            return null;
        }
        return Uri.parse(this.fileurl).getLastPathSegment();
    }

    public String getFileurl() {
        return fileurl;
    }

    public void setFileurl(String fileurl) {
        this.fileurl = fileurl;
    }

    public String getLocalpath() {
        return localpath;
    }

    public void setLocalpath(String localpath) {
        this.localpath = localpath;
    }

}
